package com.huluobo.a2204monthdemo.detail

import android.os.Bundle
import androidx.fragment.app.Fragment
import android.view.LayoutInflater
import android.view.View
import android.view.ViewGroup
import com.huluobo.a2204monthdemo.R
import com.huluobo.a2204monthdemo.databinding.FragmentDetailBinding
import com.huluobo.a2204monthdemo.utils.ImageUtils
import com.huluobo.base.view.BaseMVVMFragment

class DetailFragment : BaseMVVMFragment<FragmentDetailBinding, DetailViewModel>() {
    override fun getLayoutId(): Int = R.layout.fragment_detail

    override fun initData() {
        viewModel.goodsBean.observe(this) {
            ImageUtils.loadImage(requireContext(), it.goods_detail_one, dataBinding.detailOne)
            ImageUtils.loadImage(requireContext(), it.goods_detail_two, dataBinding.detailTwo)
        }
    }

    override fun initView() {
    }

    override fun getViewModel(): Class<DetailViewModel> {
        return DetailViewModel::class.java
    }
}